home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / DTS QT Utilities.Aug-95 / Projects & Test Apps / DigitizerShell / Mac Framework / MacMain.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-10  |  1.6 KB  |  70 lines  |  [TEXT/MPCC]

  1. /*
  2.     File:        MovieShell.c
  3.  
  4.     Contains:    Simple test shell for testing Digitizers.
  5.  
  6.     Written by:    DTS
  7.  
  8.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.        <1>         4/25/95    khs        first file
  13.        
  14. */
  15.  
  16.  
  17. // INCLUDES
  18. #include <stdio.h>
  19.  
  20. #ifdef __MWERKS__
  21. #include <sioux.h>
  22. #endif // __MWERKS__
  23.  
  24. #include "DTSQTUtilities.h"
  25. #include "MacFramework.h"
  26.  
  27.  
  28. // MAIN
  29. // ______________________________________________________________________
  30. void main(void)
  31. {
  32.     OSErr anErr = noErr;
  33.  
  34. // This is for controlling the sioux window under Metrowerks (5.0 forward)
  35. #ifdef USESIOUX    
  36.     SIOUXSettings.initializeTB = false;
  37.     SIOUXSettings.setupmenus = false;
  38.     SIOUXSettings.standalone = false;
  39.     SIOUXSettings.asktosaveonclose = true;
  40. #endif // USESIOUX    
  41.  
  42.     InitStack(10*1024L);                        // Add 10k more to the stack, for possible QD and Sound Manager needs
  43.     InitMacEnvironment(10L);                    // 10 * MoreMasters
  44.     InitMenubar();
  45.     
  46.     if( !QTUIsQuickTimeInstalled() )
  47.     {
  48.         ShowWarning("\pQuickTime is not installed on this system -- we will exit!", 0);
  49.         ExitToShell();
  50.     }
  51. #if powerc    
  52.     if( !QTUIsQuickTimeCFMInstalled() )
  53.     {
  54.         ShowWarning("\pThe QuickTime PowerPlug file is not available -- we will exit!", 0);
  55.         ExitToShell();                                // I could disable features as well.
  56.     }
  57. #endif // powerc
  58.  
  59.     anErr = EnterMovies(); DebugAssert(anErr == noErr);
  60.     if(anErr != noErr)
  61.     {
  62.         ShowWarning("\pWe have problems initializing the QuickTime environment (exit): ", anErr);
  63.         ExitToShell();
  64.     }
  65.  
  66.     printf("Digitizer Shell -- for testing of Quicktime Digitizer functionality.\n");
  67.  
  68.     MainEventLoop();
  69. }
  70.